/**
 * 
 */
package com.bot.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author zhaoyan
 *
 * 2020年2月4日
 */
public class Student implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 5070402865795948718L;
	private Integer id;
	private String name;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date created;
	
	private int provinceId;
	private int cityId;
	private int countyId;
	
	// 省
	private Area province;
	//市
	private Area city;
	//县
	private Area county;
	
	public int getProvinceId() {
		return provinceId;
	}
	public void setProvinceId(int provinceId) {
		this.provinceId = provinceId;
	}
	public int getCityId() {
		return cityId;
	}
	public void setCityId(int cityId) {
		this.cityId = cityId;
	}
	public int getCountyId() {
		return countyId;
	}
	public void setCountyId(int countyId) {
		this.countyId = countyId;
	}
	
	public Area getProvince() {
		return province;
	}
	public void setProvince(Area province) {
		this.province = province;
	}
	public Area getCity() {
		return city;
	}
	public void setCity(Area city) {
		this.city = city;
	}
	public Area getCounty() {
		return county;
	}
	public void setCounty(Area county) {
		this.county = county;
	}
	//	扩展字段
	private List<Major> list;
	private List<String> ids;
	
	
	
	public List<String> getIds() {
		return ids;
	}
	public void setIds(List<String> ids) {
		this.ids = ids;
	}
	public List<Major> getList() {
		return list;
	}
	public void setList(List<Major> list) {
		this.list = list;
	}
	//扩展字段
	private String strMajor;
	
	public String getStrMajor() {
		return strMajor;
	}
	public void setStrMajor(String strMajor) {
		this.strMajor = strMajor;
	}
	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", created=" + created + "]";
	}
	/**
	 * @param id
	 * @param name
	 * @param created
	 */
	public Student(Integer id, String name, Date created) {
		super();
		this.id = id;
		this.name = name;
		this.created = created;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}
	/**
	 * 
	 */
	public Student() {
		super();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((created == null) ? 0 : created.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Student other = (Student) obj;
		if (created == null) {
			if (other.created != null)
				return false;
		} else if (!created.equals(other.created))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}
	
	
	

}
